package card;

import java.util.ArrayList;
import java.util.Iterator;

public class Test {
    //测试类
    public static void main(String[] args) {
    Game test = new Game();
    //1买牌
        System.out.println("买牌");
        ArrayList<Card> ret = test.create();
        System.out.println(ret);
    //2洗牌
        System.out.println("洗牌");
        test.shuffle(ret);
        System.out.println(ret);
    //3发牌
        System.out.println("发牌");
        ArrayList<ArrayList<Card>> players = test.deal(ret);
//        Iterator<ArrayList<Card>> it = players.iterator();

//        while(it.hasNext()) {
//            System.out.println(it.next());
//        }
//        for(ArrayList<Card> x : players) {
//            System.out.println(x);
//        }
        for(int i = 0; i < players.size(); i++) {
            System.out.println((i+1)+"号玩家手牌："+players.get(i));
        }
    }
}

